<?php

namespace App\Http\Middleware;

class Activity
{
    //前置方法
    public function handle($request,\Closure $next)
    {
        if(time() < strtotime('2017-9-25')){
            return redirect('activity0');
        }

        return $next($request);
    }


    //后置操作
    /*public function handle($request,\Closure $next)
    {

        $response =  $next($request);
        var_dump($response);
        echo "我是后置操作";
    }*/
}